<?php
namespace App\Http\Controllers\Message;
use App\Http\Classes\FriendGroup;
use App\Http\Controllers\BaseController;

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/5/25 0025
 * Time: 上午 9:30
 */
class LetterController extends BaseController
{
    public function index(){
        $users = session('user_info')['info'];
        $users = (array)$users;

        //dd($users);
        //dd($users['user_id']);
        $group = FriendGroup::getUserAllGroups($_COOKIE['user_id']);
        //var_dump($group);
        return view('message.letter') -> with('groups',$group)
            -> with('user',$users);
    }


}